<?php defined( '_VALID_MOS' ) or die( include_once("../../404.php") );
$sql = "SELECT `title`, `image_path`, `file_path` FROM `video` order by `order_num` desc";
	$cmd = $mysqli->prepare($sql);
	$cmd->execute();
	$cmd->bind_result($title, $image_path, $file_path);
	$cmd->store_result();
?>
<div id="box_video">
	<div id="sub_box_video">
		<div class="bg_tt_right"><div class="bg_tt_left"><div class="bg_tt"><div class="text_tt">VIDEO CLIP</div></div></div></div>
		<div id="sub_box_video1">
			<div class="ct_right">
				<div class="ct_left">
					<div class="ct">
					<div id="preview"></div>
					<?php if($cmd->fetch()){ ?>
					<script type="text/javascript">
						function play(url, img){
							document.getElementById("preview").innerHTML = '<embed src="./file_upload/video/flv_player.swf" width="192" height="154" allowscriptaccess="always" allowfullscreen="true" flashvars="file='+ url +'&autostart=false&image='+ img +'" />';
						}
						play('<?php echo $file_path; ?>', '<?php echo $image_path;?>');
					</script>
					<?php } ?>
					<div style="text-align:left;padding-left: 5px;">
						<ul>
						<?php while($cmd->fetch()){ ?>
							<li> <a href="javascript:void()" onClick="javascript:play('<?php echo $file_path;?>', '<?php echo $image_path;?>')"> - <?php echo $title;?> </a></li>
						<?php } ?>
						</ul>
					</div>
				</div>
				</div>
			</div>
			<div class="bg_bt_right"><div class="bg_bt_left"><div class="bg_bt"><div class="text_bt"></div></div></div></div>
		</div>
	</div>
	<div class="clear"></div>
</div>
